#include "user.h"
#include "fcntl.h"
#include <stdio.h>
int main()
{
		int re1,re2;
		
		if(re1 = do_open("testcreate",O_RDWR) == -1)
		{
			do_open("testcreate",O_CREATE);
			re1 = do_open("testcreate",O_RDWR);
		}
	
		do_write(re1,"hello world!\n",11);
		re2 = do_open("testcreate",O_RDWR);
		int buf[10];
		do_read(re2,buf,11);
		printf("%s\n",buf);
		
		return 0;
}
